<?php


namespace app\index\controller;
use think\Controller;

class events extends Controller
{
    public function index(){
        $data = Db('activity')->select();
        $this->assign('data',$data);
        $this->fetch();
    }


    /*
     *活动详情
     */
    public function event_info(){
       $id = input('post.id');
       $data = Db('activity')->where(['id'=>$id])->find();
       $this->assign('data',$data);
       $this->fetch();
    }
}